﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="newsadd.aspx.cs" Inherits="lcmyjobs.Web.Admin.newsadd"
    ValidateRequest="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>添加文章</title>
    <script src="../ckeditor/ckeditor.js" type="text/javascript"></script>
     <link href="../css/AdminFrame.css" rel="stylesheet" type="text/css" />
     <style type="text/css">
     .cke_skin_kama{ width:90%; }
     .cke_browser_gecko{ height:430px;}
     
     </style>
    </head>
<body>
    <form id="form1" runat="server">
    <div class="rightCenter">
        <div class="rightBack">
            <div class="rightContentTop">
                <ul>
                    <li class="cur"><a href="newsadd.aspx">添加文章</a> </li>
                    <li ><a href="newslist.aspx">文章管理</a> </li>
                   
                </ul>
            </div>
            <div class="rightContentMiddle">
                <table style="width: 100%;" cellpadding="2" cellspacing="1" class="border">
                    <tr>
                        <td class="tdbg">
                            <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                <tr>
                                    <td height="35" width="120px" class="rr">
                                        类别：
                                    </td>
                                    <td height="35" width="*" class="ll">
                                        <asp:DropDownList ID="ddlid" runat="server">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td height="35" width="120px" class="rr">
                                        标题 ：
                                    </td>
                                    <td height="35" width="*" class="ll">
                                        <asp:TextBox ID="txtntitle" runat="server" Width="200px"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                            ControlToValidate="txtntitle" ErrorMessage="RequiredFieldValidator">不能为空!</asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td  width="130px" class="rr">
                                        文章内容 ：
                                    </td>
                                    <td  width="*" class="ll" style=" padding-top:6px;">

                                    <x:PageManager ID="PageManager1" runat="server" />
                                        <x:ContentPanel ID="ContentPanel1" runat="server" BodyPadding="5px" Width="850px"
                                        EnableBackgroundColor="true" ShowBorder="true" ShowHeader="true" Title="添加文章">
                                        <textarea name="UEditor1" id="UEditor1"></textarea>
                                        </x:ContentPanel>


                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td class="tdbg" align="center" valign="bottom">
                        <div style=" margin:20px 0px 0px 0px; width:350px;">
                            <asp:Button ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click" OnClientClick= "return confirm('确认要保存吗？')"  CssClass="bgbtn">
                            </asp:Button>
                            
                            <asp:Button ID="btnCancle" runat="server" Text="取消" OnClick="btnCancle_Click"  CssClass="bgbtn">
                            </asp:Button></div>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
    </form>

        <script type="text/javascript">
            window.UEDITOR_HOME_URL = '<%= ResolveUrl("~/Scripts/ueditor/") %>';
    </script>
    <script type="text/javascript" src="../Scripts/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" src="../Scripts/ueditor/ueditor.all.min.js"></script>
    <script type="text/javascript">
        var editor;
        function onReady() {
            editor = new UE.ui.Editor({
                initialFrameWidth: '100%',
                initialFrameHeight: 350,
                initialContent: "",
                minFrameHeight: 350,
                autoFloatEnabled: false,
                focus: true
                
            });
            editor.render("UEditor1");
        }


        // 提交数据之前同步到表单隐藏字段
        X.util.beforeAjaxPostBackScript = function () {
            editor.sync();
        };

        // 更新编辑器内容
        function updateUEditor(content) {
            window.setTimeout(function () {
                editor.setContent(content);
            }, 100);
        }
    </script>
</body>
</html>
